package service.impl;

import dao.MachineroomDao;
import dao.impl.MachineroomDaolmpl;
import entity.Computerroom;
import service.MachineroomService;

import java.util.List;

public class MachineroomServiceImpl implements MachineroomService {
    MachineroomDao machineroomDao = new MachineroomDaolmpl();
    //查询全部
    @Override
    public List<Computerroom> SelectAll() {
        return machineroomDao.SelectAll();
    }

    //删除
    @Override
    public boolean delete(int id) {
        if (machineroomDao.delete(id)>0){
            return true;
        }else{
            return false;
        }
    }

    //新增
    @Override
    public int add(Computerroom computerroom) {
        return machineroomDao.add(computerroom);
    }
}
